FI-3263: User Access Brands Fix Huge Bundle Error #85
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the way User Access Brand Bundles are validated so that the Bundle validation test will not fail if the Bundle is extremely large. Rather that sending the full validator to the validator, the Bundle validation test will test for each of the Bundle constraints and required fields manually. The validator has also been updated to limit the number of validation messages/errors to 50 so that the UI does not get bogged down with validation messages. The Limit Validation to a Maximum Resource Count input has been added to give the user the ability to choose how many Bundle resources they want validated. If the user submits that they want X resources validated, Inferno will limit the number of Bundle entries down to around X resources by looping through each Brand resource and adding any referenced endpoints, or parent Brand and it's referenced endpoints. This substantially cuts down the time it takes these tests to run for large Bundles. However, large Bundles can now be ran without Inferno crashing, though it may slow the system down and take a while to complete, around 20-30 minutes depending on the size of the Bundle.
Testing Guidance
Ensure running our tests against https://serve-basket.s3.us-east-2.amazonaws.com/brands.json no longer results in a validator 400 error. Then test out running the tests against https://serve-basket.s3.us-east-2.amazonaws.com/brands.json with the
Limit Validation to a Maximum Resource Count
input populated to view how it cuts down the run time of the tests.